
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module src.protein</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="src.html"><font color="#ffffff">src</font></a>.protein</strong></big></big> (13 May 2008)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/user/yhuang/pdb2pqr/trunk/pdb2pqr/src/protein.py">/user/yhuang/pdb2pqr/trunk/pdb2pqr/src/protein.py</a></font></td></tr></table>
    <p><tt>Routines&nbsp;for&nbsp;PDB2PQR<br>
&nbsp;<br>
This&nbsp;module&nbsp;contains&nbsp;the&nbsp;protein&nbsp;object&nbsp;used&nbsp;in&nbsp;PDB2PQR&nbsp;and&nbsp;associated<br>
methods<br>
&nbsp;<br>
----------------------------<br>
&nbsp;<br>
PDB2PQR&nbsp;--&nbsp;An&nbsp;automated&nbsp;pipeline&nbsp;for&nbsp;the&nbsp;setup,&nbsp;execution,&nbsp;and&nbsp;analysis&nbsp;of<br>
Poisson-Boltzmann&nbsp;electrostatics&nbsp;calculations<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Copyright&nbsp;(c)&nbsp;2002-2010,&nbsp;Jens&nbsp;Erik&nbsp;Nielsen,&nbsp;University&nbsp;College&nbsp;Dublin;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Nathan&nbsp;A.&nbsp;Baker,&nbsp;Washington&nbsp;University&nbsp;in&nbsp;St.&nbsp;Louis;&nbsp;Paul&nbsp;Czodrowski&nbsp;&amp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Gerhard&nbsp;Klebe,&nbsp;University&nbsp;of&nbsp;Marburg<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;All&nbsp;rights&nbsp;reserved.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;Redistribution&nbsp;and&nbsp;use&nbsp;in&nbsp;source&nbsp;and&nbsp;binary&nbsp;forms,&nbsp;with&nbsp;or&nbsp;without&nbsp;modification,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;are&nbsp;permitted&nbsp;provided&nbsp;that&nbsp;the&nbsp;following&nbsp;conditions&nbsp;are&nbsp;met:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Redistributions&nbsp;of&nbsp;source&nbsp;code&nbsp;must&nbsp;retain&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Redistributions&nbsp;in&nbsp;binary&nbsp;form&nbsp;must&nbsp;reproduce&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer&nbsp;in&nbsp;the&nbsp;documentation&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and/or&nbsp;other&nbsp;materials&nbsp;provided&nbsp;with&nbsp;the&nbsp;distribution.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Neither&nbsp;the&nbsp;names&nbsp;of&nbsp;University&nbsp;College&nbsp;Dublin,&nbsp;Washington&nbsp;University&nbsp;in&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;St.&nbsp;Louis,&nbsp;or&nbsp;University&nbsp;of&nbsp;Marburg&nbsp;nor&nbsp;the&nbsp;names&nbsp;of&nbsp;its&nbsp;contributors&nbsp;may&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;used&nbsp;to&nbsp;endorse&nbsp;or&nbsp;promote&nbsp;products&nbsp;derived&nbsp;from&nbsp;this&nbsp;software&nbsp;without&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;specific&nbsp;prior&nbsp;written&nbsp;permission.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;THIS&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;BY&nbsp;THE&nbsp;COPYRIGHT&nbsp;HOLDERS&nbsp;AND&nbsp;CONTRIBUTORS&nbsp;"AS&nbsp;IS"&nbsp;AND&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ANY&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED&nbsp;WARRANTIES,&nbsp;INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO,&nbsp;THE&nbsp;IMPLIED&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY&n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ED&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;OF&nbsp;THE&nbsp;POSSIBILITY&nbsp;OF&nbsp;SUCH&nbsp;DAMAGE.<br>
&nbsp;<br>
----------------------------</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br>
<a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
<a href="string.html">string</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="src.protein.html#Protein">Protein</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Protein">class <strong>Protein</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Protein">Protein</a>&nbsp;class<br>
&nbsp;<br>
The&nbsp;protein&nbsp;class&nbsp;represents&nbsp;the&nbsp;parsed&nbsp;PDB,&nbsp;and&nbsp;provides&nbsp;a<br>
hierarchy&nbsp;of&nbsp;information&nbsp;-&nbsp;each&nbsp;<a href="#Protein">Protein</a>&nbsp;contains&nbsp;a&nbsp;list&nbsp;of&nbsp;Chain<br>
objects&nbsp;as&nbsp;provided&nbsp;in&nbsp;the&nbsp;PDB&nbsp;file.&nbsp;&nbsp;Each&nbsp;Chain&nbsp;then&nbsp;contains&nbsp;its<br>
associated&nbsp;list&nbsp;of&nbsp;Residue&nbsp;objects,&nbsp;and&nbsp;each&nbsp;Residue&nbsp;contains&nbsp;a&nbsp;list<br>
of&nbsp;Atom&nbsp;objects,&nbsp;completing&nbsp;the&nbsp;hierarchy.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Protein-__init__"><strong>__init__</strong></a>(self, pdblist, definition)</dt><dd><tt>Initialize&nbsp;using&nbsp;parsed&nbsp;PDB&nbsp;file<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;pdblist:&nbsp;List&nbsp;of&nbsp;Classes&nbsp;of&nbsp;PDB&nbsp;lines&nbsp;as&nbsp;created</tt></dd></dl>

<dl><dt><a name="Protein-createHTMLTypeMap"><strong>createHTMLTypeMap</strong></a>(self, definition, outfilename)</dt><dd><tt>Create&nbsp;an&nbsp;HTML&nbsp;typemap&nbsp;file&nbsp;at&nbsp;the&nbsp;desired&nbsp;location.&nbsp;If&nbsp;a<br>
type&nbsp;cannot&nbsp;be&nbsp;found&nbsp;for&nbsp;an&nbsp;atom&nbsp;a&nbsp;blank&nbsp;is&nbsp;listed.<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;definition:&nbsp;The&nbsp;definition&nbsp;objects.<br>
&nbsp;&nbsp;&nbsp;&nbsp;outfilename:&nbsp;&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;file&nbsp;to&nbsp;write&nbsp;(string)</tt></dd></dl>

<dl><dt><a name="Protein-createResidue"><strong>createResidue</strong></a>(self, residue, resname)</dt><dd><tt>Create&nbsp;a&nbsp;residue&nbsp;object.&nbsp;&nbsp;If&nbsp;the&nbsp;resname&nbsp;is&nbsp;a&nbsp;known&nbsp;residue<br>
type,&nbsp;try&nbsp;to&nbsp;make&nbsp;that&nbsp;specific&nbsp;object,&nbsp;otherwise&nbsp;just&nbsp;make<br>
a&nbsp;standard&nbsp;residue&nbsp;object.<br>
&nbsp;<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;residue:&nbsp;&nbsp;A&nbsp;list&nbsp;of&nbsp;atoms&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;resname:&nbsp;&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;residue&nbsp;(string)<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;&nbsp;residue:&nbsp;&nbsp;The&nbsp;residue&nbsp;object&nbsp;(Residue)</tt></dd></dl>

<dl><dt><a name="Protein-getAtoms"><strong>getAtoms</strong></a>(self)</dt><dd><tt>Return&nbsp;all&nbsp;Atom&nbsp;objects&nbsp;in&nbsp;list&nbsp;format<br>
&nbsp;<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;atomlist:&nbsp;&nbsp;List&nbsp;of&nbsp;Atom&nbsp;objects&nbsp;in&nbsp;the&nbsp;protein&nbsp;(list)</tt></dd></dl>

<dl><dt><a name="Protein-getChains"><strong>getChains</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;chains&nbsp;object<br>
&nbsp;<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;chains:&nbsp;The&nbsp;list&nbsp;of&nbsp;chains&nbsp;in&nbsp;the&nbsp;protein&nbsp;(chain)</tt></dd></dl>

<dl><dt><a name="Protein-getCharge"><strong>getCharge</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;total&nbsp;charge&nbsp;on&nbsp;the&nbsp;protein<br>
NOTE:&nbsp;&nbsp;Since&nbsp;the&nbsp;misslist&nbsp;is&nbsp;used&nbsp;to&nbsp;identify&nbsp;incorrect<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;charge&nbsp;assignments,&nbsp;this&nbsp;routine&nbsp;does&nbsp;not&nbsp;list&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;and&nbsp;5&nbsp;termini&nbsp;of&nbsp;nucleic&nbsp;acid&nbsp;chains&nbsp;as&nbsp;having<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;non-integer&nbsp;charge&nbsp;even&nbsp;though&nbsp;they&nbsp;are&nbsp;(correctly)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;non-integer.<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;&nbsp;misslist:&nbsp;List&nbsp;of&nbsp;residues&nbsp;with&nbsp;non-integer<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;charges&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;charge:&nbsp;&nbsp;&nbsp;The&nbsp;total&nbsp;charge&nbsp;on&nbsp;the&nbsp;protein&nbsp;(float)</tt></dd></dl>

<dl><dt><a name="Protein-getResidues"><strong>getResidues</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;list&nbsp;of&nbsp;residues&nbsp;in&nbsp;the&nbsp;entire&nbsp;protein</tt></dd></dl>

<dl><dt><a name="Protein-numAtoms"><strong>numAtoms</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;number&nbsp;of&nbsp;atoms&nbsp;for&nbsp;the&nbsp;entire&nbsp;protein(including<br>
multiple&nbsp;chains)</tt></dd></dl>

<dl><dt><a name="Protein-numResidues"><strong>numResidues</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;number&nbsp;of&nbsp;residues&nbsp;for&nbsp;the&nbsp;entire&nbsp;protein&nbsp;(including<br>
multiple&nbsp;chains)<br>
&nbsp;<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;count:&nbsp;&nbsp;Number&nbsp;of&nbsp;residues&nbsp;in&nbsp;the&nbsp;protein&nbsp;(int)</tt></dd></dl>

<dl><dt><a name="Protein-printAtoms"><strong>printAtoms</strong></a>(self, atomlist, chainflag<font color="#909090">=0</font>)</dt><dd><tt>Get&nbsp;the&nbsp;text&nbsp;for&nbsp;the&nbsp;entire&nbsp;protein<br>
Parameters<br>
&nbsp;&nbsp;&nbsp;&nbsp;atomlist:&nbsp;&nbsp;The&nbsp;list&nbsp;of&nbsp;atoms&nbsp;to&nbsp;include&nbsp;(list)<br>
&nbsp;&nbsp;&nbsp;&nbsp;chainflag:&nbsp;Flag&nbsp;whether&nbsp;to&nbsp;print&nbsp;chainid&nbsp;or&nbsp;not&nbsp;-<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defaults&nbsp;to&nbsp;0&nbsp;(int)<br>
Returns<br>
&nbsp;&nbsp;&nbsp;&nbsp;text:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;list&nbsp;of&nbsp;(stringed)&nbsp;atoms&nbsp;(list)</tt></dd></dl>

<dl><dt><a name="Protein-reSerialize"><strong>reSerialize</strong></a>(self)</dt><dd><tt>Generate&nbsp;new&nbsp;serial&nbsp;numbers&nbsp;for&nbsp;atoms&nbsp;in&nbsp;the&nbsp;protein</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>BACKBONE</strong> = ['N', 'CA', 'C', 'O', 'O2', 'HA', 'HN', 'H', 'tN']<br>
<strong>DIHEDRAL</strong> = 57.2958<br>
<strong>SMALL</strong> = 9.9999999999999995e-08<br>
<strong>__author__</strong> = 'Todd Dolinsky, Yong Huang'<br>
<strong>__date__</strong> = '13 May 2008'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Todd&nbsp;Dolinsky,&nbsp;Yong&nbsp;Huang</td></tr></table>
</body></html>